#include "touchdialog.h"
#include <QtGui>
#include "wndmanager.h"

TouchDialog::TouchDialog(const QString& info, DialogType type, QWidget *parent)
	: QDialog(parent)
{
	ui.setupUi(this);
	WndManager::AdjustWndStyle(this);

	ui.infoLabel->setText(info);

	switch(type){
		case kDialogQuestion:
		break;
		case kDialogInfo:
			ui.cancelButton->setVisible(false);
			ui.okButton->move((width() - ui.okButton->width())/2, 
							   ui.okButton->pos().y());
		break;
		default:
		break;
	}

	connect(ui.okButton, SIGNAL(clicked()), this, SLOT(accept()));
	connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
}

TouchDialog::~TouchDialog()
{
	delete ui.infoLabel;
	delete ui.okButton;
	delete ui.cancelButton;
}

